In a cloud computing environment, computing is delivered as a service rather than a product, whereby shared resources, software and information are provided to computers and other devices as a metered service over a network, such as the Internet. In such an environment, computation, software, data access and storage services are provided to users that do not require knowledge of the physical location and configuration of the system that delivers the services.
In a virtualized computer environment, such as may be implemented in a physical cloud computing node of the cloud computing environment, the virtualized computer environment includes a virtual operating system. The virtual operating system includes a common base portion and separate user portions that all run on a physical computer. The physical computer is referred to as a host. The common base portion may be referred to as a hypervisor in which one or more virtual machines in the user portions are run by the hypervisor.
Virtual machines that are running on the physical computer (also referred to as “physical machine,” “compute machine” or “compute node”) of the physical cloud computing node may need to be migrated or relocated to another physical compute machine in the same or different cloud computing node for various reasons, such as to balance the cloud computing resources or to perform a maintenance operation. For example, a compute machine may experience an increase in workload demand thereby requiring additional virtual machines to handle the increase in workload demand. Such virtual machines may be migrated from compute machine(s) that are experiencing a low workload demand. In another example, virtual machines may need to be migrated to another compute machine if a maintenance operation needs to be performed on the compute machine that is hosting the virtual machines.
In the process of migrating or relocating virtual machines from one physical compute machine to another compute machine, the contents of the virtual machine's physical memory as well as the virtual machine's disk drive utilized by the migrating virtual machine needs to be copied. Furthermore, the network address assigned to the migrated virtual machine needs to be reassigned. As a result, in the process of migrating or relocating virtual machines from one physical compute machine to another compute machine, a “shell virtual machine” is created with the same attributes as the migrating virtual machine. Existing disks utilized by the migrating virtual machine are mapped to both the hypervisor in the virtual machine's current compute machine and the hypervisor in the target compute machine. The contents of the physical memory utilized by the migrating virtual machine are copied to the target hypervisor using an iterative approach to recopy memory contents that have changed during the copy operation. Such an iterative approach to recopy memory contents that have changed during the copy operation may result in a longer duration of time in migrating virtual machines. Additionally, the network address of the migrating virtual machine is switched to the target compute machine. The source migrating virtual machine is then stopped and deleted.
However, there is not currently a means for selecting the optimal virtual machine to be migrated from one physical compute machine to another compute machine to lessen the duration of time in migrating virtual machines that takes into consideration the iterative approach to recopy memory contents that have changed during the copy operation.